﻿Public Class frmtesteImp




    Private Sub PrintDocument1_PrintPage(ByVal sender As System.Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage

        Dim g As Graphics = e.Graphics

        Dim mensagem As String = " Olá meu nome é : "

        mensagem = mensagem & "Leandro Guedes da Silva"

        Dim FonteMensagem As New Font("Verdana", 12, System.Drawing.GraphicsUnit.Point)

        g.DrawString(mensagem, FonteMensagem, Brushes.Blue, 100, 100)


    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        PrintPreviewDialog1.ShowDialog()
    End Sub

    Private Sub rptProdutos(ByVal sender As Object, ByVal Relatorio As System.Drawing.Printing.PrintPageEventArgs)
        Dim margemEsq As Single = Relatorio.MarginBounds.Left

        Dim margemSup As Single = Relatorio.MarginBounds.Top

        Dim margemDir As Single = Relatorio.MarginBounds.Right

        Dim margemInf As Single = Relatorio.MarginBounds.Bottom

        Dim fonteTitulo As Font

        Dim fonteRodape As Font

        Dim fonteNormal As Font


        fonteTitulo = New Font("Verdana", 15, FontStyle.Bold)

        fonteRodape = New Font("Verdana", 8)

        fonteNormal = New Font("Verdana", 10)

    End Sub
End Class